package com.psm.model;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Model;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.Record;

import java.util.List;


/**
 * Created by cheam on 15/6/19.
 */
public class SysPaCode extends Model<SysPaCode> {

    public static String tableName="sys_pa_code";

    public static final SysPaCode me = new SysPaCode();

    public List<Record> query_code(String table,String field){
        List<Record> list= Db.find("select * from " + this.tableName + " where bus_table=? and bus_field=?", new Object[]{table, field});

        return list;
    }

}
